1. Field of the Invention
The present invention relates to a printing apparatus, a method for controlling the printing apparatus, and a storage medium.
2. Description of the Related Art
In recent years, an interface for connecting a printing apparatus and a host apparatus has generally included a universal serial bus (USB) interface (I/F) and a network I/F with an Ethernet cable. The interfaces have been used to not only send print data from the host apparatus to the printing apparatus but also to send status information such as an error, which occurred in the printing apparatus, from the printing apparatus to the host apparatus.
For communication of the print data and the status information, Japanese Patent Application Laid-Open No. 2000-238363 discusses a configuration in which different logical ports are respectively used in communication of print data and communication of status information. The communication of the print data and the communication of the status information do not compete with each other by respectively using the different logical ports so that communication can be efficiently performed between the printing apparatus and the host apparatus. A “logical port” used herein means a port that is physically connected via one communication cable but is logically usable as each of a plurality of communication ports. For example, the USB I/F can have a plurality of endpoints. Each of the endpoints corresponds to the logical port. The network I/F can virtually implement a plurality of communication ports by designating port numbers of a transmission control protocol/Internet protocol (TCP/IP). The communication port corresponds to the logical port.
An initialization sequence during power-on of a general printing apparatus will be described with reference to FIG. 1. When power to the printing apparatus is turned on, an operating system (OS) is first started (101). When the start of the OS (101) has been completed, initialization of an interface (102) and initialization of a printer engine (103) are performed in parallel.
“Initialization of an interface” means bringing the USB I/F or the network I/F into a communicable state. However, communication cannot be immediately performed because the initialization of the interface (102) has been completed. To perform the communication, the communication port needs to be opened. On the other hand, “initialization of a printer engine” means bringing the printer engine into a printable state. More specifically, an operation of each mechanism is checked as to whether a fixing device heater can be temperature-adjusted to a defined temperature and whether a sheet conveyance motor normally operates, for example. When the initialization of the interface (102) and the initialization of the printer engine (103) are compared with each other, it takes more time to initialize the printer engine than to initialize the interface. When both the initialization of the interface (102) and the initialization of the printer engine (103) have been completed, the printing apparatus enters a printable state.
For the general printing apparatus, timing at which a print data communication port used to communicate the print data is opened and timing at which a status information communication port used to communicate the status information such as the error is opened will be described below. FIG. 2 illustrates a printing apparatus of a first type as the general printing apparatus. The printing apparatus of the first type receives page description language (PDL) data, which has been sent from a host apparatus, and rasterizes the received PDL data into bit map data, to perform printing. The printing apparatus of the first type has a feature of including a display unit such as a liquid crystal display (LCD).
When power to the printing apparatus of the first type is turned on, an OS is first started (201). When the start of the OS (201) has been completed, initialization of an interface (202) and initialization of a printer engine (203) are performed in parallel. In the printing apparatus of the first type, both a print data communication port and a status information communication port are opened at timing at which the initialization of the printer engine (203) has been completed.
In the printing apparatus of the first type, it is assumed that an engine error occurred at timing 204 during the initialization of the printer engine (203). At this time, the status information communication port was not opened. However, a content of the engine error can be displayed on the display unit. Therefore, there is no problem as long as timing at which the status information communication port is opened is the timing at which the initialization of the printer engine (203) has been completed.
If the engine error has occurred, restart accompanied by power-off of the printing apparatus is required after a user performs an operation for eliminating the engine error. When the printing apparatus is restarted, the print data (PDL data and rasterized bit map data), which has already been stored in the printing apparatus, is deleted. Even if the printing apparatus of the first type is restarted, accompanied by the power-off, however, the printing apparatus does not store the print data because timing at which the print data communication port is opened is the timing at which the initialization of the printer engine (203) has been completed. Therefore, for the printing apparatus of the first type, there is no problem as long as the timing at which the print data communication port is opened is the timing at which the initialization of the printer engine (203) has been completed.
Consider a printing apparatus of a second type that differs from the printing apparatus of the first type. The printing apparatus of the second type has a feature of not including a display unit such as a LCD, unlike the printing apparatus of the first type.
For the printing apparatus of the second type, an issue occurring when timing at which a print data communication port is opened and timing at which a status information communication port is opened are made similar to those for the printing apparatus of the first type will be described with reference to FIG. 3. When power to the printing apparatus of the second type is turned on, an OS is first started (301). When the start of the OS (301) has been completed, initialization of an interface (302) and initialization of a printer engine (303) are performed in parallel. In FIG. 3, the timing at which the print data communication port is opened and the timing at which the status information communication port is opened are similar to those for the printing apparatus of the first type, and both the print data communication port and the status information communication port are opened at timing at which the initialization of the printer engine (303) has been completed.
When an engine error occurs at timing 304 during the initialization of the printer engine (303), a user needs to be notified of the engine error. However, the printing apparatus of the second type does not include the display unit, and the status information communication port has not been opened. Thus, the user cannot be notified of the engine error.